[browser][coreCLR] fix streaming instatiation for NodeJS#123332
Merged
pavelsavara merged 6 commits intodotnet:mainfrom Jan 19, 2026
Merged
[browser][coreCLR] fix streaming instatiation for NodeJS#123332pavelsavara merged 6 commits intodotnet:mainfrom
pavelsavara merged 6 commits intodotnet:mainfrom
Conversation
Member
pavelsavara
commented
Jan 18, 2026
- use real Response class when possible
Contributor
|
Tagging subscribers to this area: @agocke, @jeffschwMSFT, @elinor-fung |
pavelsavara
commented
Jan 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes streaming instantiation for Node.js by introducing a responseLike helper function that uses the real Response class when available, and provides appropriate Content-Type headers for assets to enable proper WebAssembly streaming.
Changes:
- Introduced a
responseLikefunction that uses the nativeResponseconstructor when available, with proper fallback for environments without it - Added
expectedContentTypeparameter tofetchLikeand thread it through to responses for proper WASM Content-Type headers - Created
behaviorToContentTypeMapto map asset behaviors to their MIME types - Renamed
runtimeToBlazorAssetTypeMaptobehaviorToBlazorAssetTypeMapfor better naming consistency
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/native/corehost/browserhost/loader/polyfills.ts | Added responseLike helper function, updated fetchLike to accept and use expectedContentType, refactored response creation to use the helper |
| src/native/corehost/browserhost/loader/assets.ts | Added behaviorToContentTypeMap, renamed asset type mapping for consistency, updated loadResourceFetch to use content types and responseLike |
maraf
approved these changes
Jan 19, 2026
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Member
Author
|
/ba-g known issues |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.